import pytest
from pathlib import Path
import sys

# 添加项目根目录到 Python 路径
project_root = Path(__file__).parent.parent
sys.path.append(str(project_root))

@pytest.fixture
def test_config():
    """测试配置"""
    return {
        "server": {
            "host": "localhost",
            "port": 11434
        },
        "ui": {
            "theme": "light",
            "language": "zh_CN"
        },
        "chat": {
            "model": "llama2",
            "temperature": 0.7,
            "max_length": 2000
        }
    }

@pytest.fixture
def test_messages():
    """测试消息"""
    return [
        {
            "role": "user",
            "content": "你好",
            "timestamp": "2024-02-01 12:00:00"
        },
        {
            "role": "assistant",
            "content": "你好！有什么我可以帮你的吗？",
            "timestamp": "2024-02-01 12:00:01"
        }
    ]
